import {MdPreview} from "md-editor-rt";
import {useState} from "react";
import {OVER} from "@/app/assets/data/over";
import {ABOUT} from "@/app/assets/data/about";
import {HELP} from "@/app/assets/data/help";

/**
 * 预览MD
 * @param source
 * @constructor
 */
export default function ViewMD({source}: any) {
    return (
        <>
            <MdPreview modelValue={source === 1 ? ABOUT : source === 2 ? HELP : OVER}
                       previewTheme={'default'}
                       theme={"light"}/>
        </>
    )
}